const app = getApp()
Page({
  data: {
    shopObj: {
      shopName: '',
      status: 0,
      address: '',
      notice: '',
      logo: '',
      giveMoney: '',
      giveFree: '',
      goodsTotal: 0,
      saleTotal: '',
      phone:''
    }

  },
  onLoad: function (options) {
    this.getData()
  },
  getData() {
    let shpDetail = app.Store.get('shopDetail')
    if (shpDetail) {
      this.setData({
        shopObj: {
          type: shpDetail.type,
          shopName: shpDetail.shopName,
          status: shpDetail.status,
          address: shpDetail.address,
          notice: shpDetail.notice,
          logo: shpDetail.logo,
          giveMoney: shpDetail.giveMoney,
          giveFree: shpDetail.giveFree,
          saleTotal: shpDetail.saleTotal,
          goodsTotal: shpDetail.goodsTotal,
          phone: shpDetail.phone
        }
      })
    }
  },
  changeData(data) {
    this.getData()
  }

})